<template>
  <div class="login">
    <div class="register"><a href="#" @click="goto"> 注册</a>
     </div>
    <div class="logo">
      <img src="@/assets/imgs/logo.png" alt />
    </div>
    <van-cell-group>
      <van-field v-model="phone" label="手机号" placeholder="请输入手机号">
        <van-button slot="button" size="small" type="primary">发送验证码</van-button>
      </van-field>
      <van-field v-model="sms" center clearable label="验证码" placeholder="请输入短信验证码"></van-field>
    </van-cell-group>
    <div class="submit">
      <van-button type="primary">短信登录</van-button>
    </div>
    <Footer></Footer>
  </div>
</template>
<script>
import Footer from '@/components/Footer'
export default {
  data() {
    return {
      phone: "",
      sms: ""
    };
  },
  methods: {
    goto(){
      this.$router.push("/register")
    }
  },
  components:{
    Footer
  }
};
</script>
<style lang="less" scoped>
.login {
  background-color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  .register {
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px;
    font-size: 14px;
  }
  .logo {
    padding: 80px 0;
    margin-bottom: 30px;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    img {
      height: 40px;
      display: block;
    }
  }
  .submit {
    .van-button {
      background: #07C160;
      text-align: center;
      width: 340px;
      margin-top: 40px;
      padding: 5px;
      border-radius: 10px;
      box-sizing: border-box;
    }
    .van-button--primary {
      line-height: 34px;
    }
    .van-button__text {
      text-align: center;
      font-size: 18px;
    }
  }
}
</style>